Including both static and dynamic typing in the same programming language
نویسندگان
چکیده
Dynamic languages are becoming increasingly popular for different software development scenarios such as Web engineering, rapid prototyping, or the construction of applications that require runtime adaptiveness. These languages are built on the idea of supporting reasoning about (and customizing) program structure, behaviour and environment at runtime. The dynamism offered by dynamic languages is, however, counteracted by two main limitations: no early type error detection and fewer opportunities for compiler optimizations. To obtain the benefits of both dynamically and statically typed languages, we have designed the StaDyn programming language that provides both approaches. StaDyn keeps gathering type information at compile time, even when dynamic variables are used. This type information is used to offer early type error detection, direct interoperation between static and dynamic code, and better runtime performance. Following the Separation of Concerns principle, it is possible to customize the trade-off between runtime flexibility of dynamic typing, and safety, performance and robustness of static typing. A runtime performance ∗Computer Science Department, University of Oviedo, Calvo Sotelo s/n, 33007, Oviedo, Spain, [email protected] †Computer Science Department, University of Vigo, As Lagoas s/n, 32004, Orense, Spain, [email protected]
منابع مشابه
Gradual Typing for Functional Languages
Static and dynamic type systems have well-known strengths and weaknesses, and each is better suited for different programming tasks. There have been many efforts to integrate static and dynamic typing and thereby combine the benefits of both typing disciplines in the same language. The flexibility of static typing can be improved by adding a type Dynamic and a typecase form. The safety and perf...
متن کاملUnion and intersection types to support both dynamic and static typing
Although static typing provides undeniable benefits for the development of applications, dynamically typed languages have become increasingly popular for specific scenarios. Since each approach offers different benefits, the StaDyn programming language has been designed to support both dynamic and static typing. This paper describes the minimal core of the StaDyn programming language. Its type ...
متن کاملRock typing and reservoir zonation based on the NMR logging and geological attributes in the mixed carbonate-siliciclastic Asmari Reservoir
Rock typing is known as the best way in heterogeneous reservoirs characterization. The rock typing methods confine to various aspects of the rocks such as multi-scale and multi-modal pore types and size, rock texture, diagenetic modifications and integration of static/dynamic data. Integration of static and dynamic behavior of rocks and their sedimentary features are practiced in this study. Po...
متن کاملGradual Typing in an Open World
Gradual typing combines static and dynamic typing in the same language, offering the benefits of both to programmers. Static typing provides error detection and strong guarantees while dynamic typing enables rapid prototyping and flexible programming idioms. For programmers to take full advantage of a gradual type system, however, they must be able to trust their type annotations, and so runtim...
متن کاملBrand Objects for Nominal Typing (Artifact)
In Brand Objects for Nominal Typing, we describe an implementation of a branding system for both runtime and static types. This artifact provides the extended form of Hopper, an interpreter for the Grace programming language, and extra modules which define both the dynamic objects and the modular static type checker. The extra modules extend the existing structural type checker in the provided ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- IET Software
دوره 4 شماره
صفحات -
تاریخ انتشار 2010